package com.marktotop.service;

import com.marktotop.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.marktotop.response.ResultBean;
import com.marktotop.vo.LoginVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author MarkToTop
 * @since 2021-06-18
 */
public interface IUserService extends IService<User> {

    /**
     * 登录功能
     *
     * @param loginVO
     * @param request
     * @param response
     * @return
     */
    ResultBean login(LoginVO loginVO, HttpServletRequest request, HttpServletResponse response);


    /**
     * 根据Cookie获取用户
     *
     * @param userTicket
     * @param request
     * @param response
     * @return
     */
    User getUserFromCookie(String userTicket,HttpServletRequest request, HttpServletResponse response);
}
